var express = require('express');
var router = express.Router();

// router.use(function timeLog(req, res, next) {
//   console.log('Time: ', Date.now());
//   next();
// });

router.get('/', function (req, res) {
  res.set('Content-Type', 'application/json');
  res.send({text: 'Hello World'});
  // console.log(req.query.name);
  // console.log(req.query.tel);
});

router.post('/', function (req, res) {
  res.set('Content-Type', 'application/json');
  res.send({text: 'Hello ' + req.body.name});
});

module.exports = router;
